package pso;

public class Schwefel extends BlackBoxFunction {

	public Schwefel(int dimension) {
		super(new Point(dimension, -500.0), new Point(dimension, 500.0));
	}

	protected double evaluateHelper(Point p) {
		double acc = 0;
		for (double x : p.getCoordinates()) {
			acc += (-x * Math.sin(Math.sqrt(Math.abs(x))));
		}
		return acc;
	}

}
